/**
 * Created by json.lu on 2016/3/23.
 */
var mysql=require('../config/mysqldb')();
var adminModel={};
adminModel.getUserInfoByUserName=function(username,callback)
{
    mysql.query('select * from blog_admin where name=? limit 1',[username],function(error,result){
        console.log(error)
        callback(error,result);
    })
    //mysql.end();
}
adminModel.getUserList=function(callback)
{
    new Promise(function (callback, reject) {
        sql1(function (r) {
            console.info("fefeefef")
            callback(r);
        })
    });

    mysql.query('select * from blog_admin',function(error,result){
        callback(error,result);
    })
}
module.exports = adminModel;